import os
import uuid

class Myfile:
    def __init__(self):
        self.dir = './static/files'

        # 进行重命名操作
    def rename(selfself,filename):
        name = os.path.splitext(filename)[1]
        fname = uuid.uuid4().hex+name
        return fname

myf = Myfile()